﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admincp/MasterPageEmpty.master"
    AutoEventWireup="true" CodeFile="giaovien.aspx.cs" Inherits="admincp_giaovien" %>

<%@ Register Src="wucNavTop.ascx" TagName="wucNavTop" TagPrefix="uc1" %>
<%@ Register Src="wucSideBar.ascx" TagName="wucSideBar" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphTopBar" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphSideBar" runat="Server">
    <uc2:wucSideBar ID="wucSideBar1" runat="server" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphNavTop" runat="Server">
    <uc1:wucNavTop ID="wucNavTop1" runat="server" />
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cphContent" runat="Server">
    <div class="flat_area grid_16">
        <h2>
            Danh mục giáo viên</h2>
    </div>
    <div class="flat_area grid_16">
        <div class="block">
            <button id="btnThemMoiGiaoVien" onserverclick="ThemMoiGiaoVien" runat="server" class="button_colour round_all">
                <img height="24" width="24" alt="Thêm giáo viên" src="images/icon_add.png"><span>Thêm giáo viên</span></button>
        </div>
    </div>
    <div class="box grid_16 round_all">
        <asp:ListView ID="lvGiaoVien" runat="server" OnItemCommand="lvGiaoVien_ItemCommand"
            OnItemDataBound="lvGiaoVien_ItemDataBound" 
            onitemdeleting="lvGiaoVien_ItemDeleting" onitemediting="lvGiaoVien_ItemEditing">
            <LayoutTemplate>
                <table class="display table">
                    <thead>
                        <tr>
                            <th style="width: 5%">
                                Mã giáo viên
                            </th>
                            <th style="width: 60%">
                                Tên giáo viên
                            </th>
                            <th style="width: 6%">
                                Điện thoại
                            </th>
                            <th style="width: 6%">
                                Hình
                            </th>
                            <th style="width: 5%" align="center">
                                Trạng thái
                            </th>
                            <th style="width: 5%" align="center">
                                Sửa / Xóa
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <asp:PlaceHolder ID="itemPlaceHolder" runat="server"></asp:PlaceHolder>
                    </tbody>
                </table>
            </LayoutTemplate>
            <ItemTemplate>
                <tr>
                    <td valign="middle">
                        <b>
                            <%# Eval("MaGiaoVien")%></b>
                    </td>
                    <td>
                        <b>
                            <%# Eval("TenGiaoVien")%></b>
                    </td>
                    <td align="center">
                        <%# Eval("DienThoai")%>
                    </td>
                    <td align="center">
                        <img alt="" width="55" src='<%# KiemTraHinhDaiDien(Eval("Avatar")) %>' />
                    </td>
                    <td align="center">
                        <asp:Image ID="imgStatus" ImageUrl='<%# HienThiTrangThaiBangHinhAnh(Eval("TrangThai")) %>' runat="server" Width="10"
                            Height="10" />
                    </td>
                    <td align="center">
                        <asp:ImageButton ID="btnSuaGiaoVien" runat="server" CssClass="help" ToolTip="Sửa giáo viên"
                            ImageUrl="images/icon_edit.png" CommandName="EDIT" CommandArgument='<%# Eval("MaGiaoVien") %>' />
                        <img alt="" src="images/icon_blank.png" />
                        <asp:ImageButton ID="btnXoaGiaoVien" runat="server" CssClass="help" ToolTip="Xóa giáo viên"
                            ImageUrl="images/icon_delete.png" CommandName="DELETE" CommandArgument='<%# Eval("MaGiaoVien") %>'
                            OnClientClick="return confirm('Bạn chắc chắn muốn xóa giáo viên này?')" />
                    </td>
                </tr>
            </ItemTemplate>
        </asp:ListView>
    </div>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="cphTemplateOption" runat="Server">
</asp:Content>
